# To change this template, choose Tools | Templates
# and open the template in the editor.

__author__="yangqibin"
__date__ ="$Nov 18, 2011 1:34:32 AM$"
import web
import feedparser

render = web.template.render('templates', globals={})


class FreeTop:
    def GET(self, count):
        data = feedparser.parse('http://itunes.apple.com/us/rss/topfreeapplications/limit=%d/xml' % int(count))
        return render.free_top(data['entries'][0]['summary'])

if __name__ == "__main__":
    d = feedparser.parse('http://itunes.apple.com/us/rss/topalbums/limit=10/xml')
    print d['feed']['title']
    
    
